/*
 * @Author: LeslieKimi 947519365@qq.com
 * @Date: 2023-03-13 22:15:10
 * @LastEditors: LeslieKimi 947519365@qq.com
 * @LastEditTime: 2023-03-13 22:24:25
 * @FilePath: /chamon_web_pc/src/App.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React , { Component,useEffect  }from 'react';
import { HashRouter as Router, Routes, Route} from "react-router-dom";
import logo from './logo.svg';
import './App.css';

import {v4 as uuid} from 'uuid'

import About from './About';
import Home from './Home';
import ThreeTest from './ThreeTest';
import ModleTest from './modleTest';
import ReactDemo from './reactDemo';
import ReactDemo1 from './reactDemo1';
function App() {


useEffect(() => {
  const loadAmmo = async () => {
    const Ammo = await new Promise((resolve) => {
      const script = document.createElement('script');
      script.src = './ammo.wasm.js';
      script.async = true;
      script.onload = () => {
        console.log(1,Ammo)
      }
      document.body.appendChild(script);
    });
    // Ammo 对象现在可在您的组件中使用
    console.log(Ammo,'=====================>');
  };
  loadAmmo();
}, []);
  return (
   
     
  
    
    <Router>
        <Routes>
          <Route   path="/" element={<Home/>} key={1}/>
          <Route path="/about" element={<About/> } key={2} />
          <Route path="/ThreeTest" element={<ThreeTest/> } key={3} />
          <Route path="/ModleTest" element={<ModleTest/> } key={'ModleTest'} />
          <Route path="/ReactDemo" element={<ReactDemo/> } key={'ReactDemo'} />
          <Route path="/ReactDemo1" element={<ReactDemo1/> } key={'ReactDemo1'} />
        </Routes>
    </Router>
    



    
  );
}

export default App;
